import axios from '../../axios';

const classifyApi = {
  //获取数据
  getClassify() {
    return axios({
      url: '/classify/lookAllClassify',
      method: 'get',
    });
  },
  //新增数据
  addClassify(data) {
    return axios({
      url: '/classify/addOneClassify',
      method: 'post',
      data,
    });
  },
  //获取修改
  getOneClassify(data) {
    return axios({
      url: '/classify/getOneClassify',
      method: 'post',
      data: { _id: data },
    });
  },
  //修改
  updataClassify(data) {
    return axios({
      url: '/classify/updataOneClassify',
      method: 'post',
      data,
    });
  },
  //删除
  deleOneClassify(data) {
    return axios({
      url: '/classify/deleteOneClassify',
      method: 'post',
      data: { _id: data },
    });
  },
};
export default classifyApi;
